#include <cstdlib>
#include <string>
#include <iostream>
#include <vector>
#include <climits>

using namespace std;

class Solution {
public:
	int power(int x, int k){
		if (k == 0) return 1;
		return power(x, k - 1) * x;
	}
	int getKthNumber(int x, int k){
		if (k == 10) return x / power(10, k - 1);
		return (x % power(10, k)) / power(10, k - 1);
	}
	bool isPalindrome(int x) {
		if (x < 0) return false;
		int ndigits = 0;
		for (int i = 0;; ++i){
			if (double(x) / power(10, i) < 10){
				ndigits = i+1;
				break;
			}
		}
		for (int i = 1; i < ndigits / 2 + 1; ++i){
			int up = getKthNumber(x, ndigits - i + 1);
			int down = getKthNumber(x, i);
			if (getKthNumber(x, i) != getKthNumber(x, ndigits - i + 1)) return false;
		}
		return true;
	}
};

int main(int argc, char** argv){
	Solution s;
	cout << 1410110141.0/s.power(10, 9) << endl;
	cout << s.isPalindrome(1410110141);
	return 0;
}